﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace EfCoreTest.Repository
{
    public class DataContext : DbContext
    {
        private string _connectString;
        public DataContext() : base()
        {

        }

        public DataContext(string connectString)
            : base()
        {
            _connectString = connectString;
        }

        public DataContext(DbContextOptions<DataContext> options)
            : base(options)
        {

        }

        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            optionsBuilder.UseSqlite("Filename=./sqlitedb.db");
            //optionsBuilder.UseSqlite(_connectString);
        }


        public DbSet<UserInfo> Users { get; set; }
    }
}
